import 'package:json_annotation/json_annotation.dart';
part 'EcyUserModel.g.dart';

@JsonSerializable()
class EcyUserModel {
  String token;
  String? nickname;
  String? username;
  int? gender;
  String? uid;
  String? avatar;
  String? signature;
  String? birthday;
  int? level;

  EcyUserModel(this.token);

  // 从JSON创建User实例的工厂方法
  factory EcyUserModel.fromJson(Map<String, dynamic> json) =>
      _$EcyUserModelFromJson(json);

  // 将User实例转换为JSON的方法
  Map<String, dynamic> toJson() => _$EcyUserModelToJson(this);
}
